local i
a={534,4324.5,43232.1,9,8,4,32,50}
x=a[1]
for i=1,#a do
   if(a[i]>x) then 
     x=a[i]
     --print('a[' .. i .. ']=' .. a[i]); 
   end
end
print('x max=' .. x )

for i=1,#a do
   if(a[i]<x) then
     x=a[i]
     end
end
print('x min=' .. x )
